/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * PnlListStore.java
 *
 * Created on 14 ม.ค. 2553, 2:16:28
 */

package Inventory;

/**
 *
 * @author hj
 */
public class PnlListSupplier extends javax.swing.JPanel {

    /** Creates new form PnlListStore */
    public PnlListSupplier() {
        initComponents();
    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        pnlHeadListSup = new javax.swing.JPanel();
        lblHeadListSup = new javax.swing.JLabel();
        btnSupListSearch = new javax.swing.JButton();
        btnSupListAdd = new javax.swing.JButton();
        btnSupListDel = new javax.swing.JButton();
        btnSupListEdit = new javax.swing.JButton();
        btnSupPrint = new javax.swing.JButton();
        pnlListSup = new javax.swing.JPanel();
        jScrollPane1 = new javax.swing.JScrollPane();
        tblListSupplier = new javax.swing.JTable();
        lblSupCode = new javax.swing.JLabel();
        lblSupCompany = new javax.swing.JLabel();
        lblSupAddress = new javax.swing.JLabel();
        lblSupContact = new javax.swing.JLabel();
        lblSupPhone = new javax.swing.JLabel();
        lblSupFax = new javax.swing.JLabel();
        txtSupCode = new javax.swing.JTextField();
        txtSupPhone = new javax.swing.JTextField();
        txtSupCompany = new javax.swing.JTextField();
        txtSupFax = new javax.swing.JTextField();
        txtSupContact = new javax.swing.JTextField();
        jScrollPane2 = new javax.swing.JScrollPane();
        txaSupAddress = new javax.swing.JTextArea();
        lblSupPrivace = new javax.swing.JLabel();
        cmbSupProvice = new javax.swing.JComboBox();
        lblSupZip = new javax.swing.JLabel();
        txtSupZip = new javax.swing.JTextField();
        lblSupStatus = new javax.swing.JLabel();
        cmbSupStatus = new javax.swing.JComboBox();
        lblSupAccNum = new javax.swing.JLabel();
        txtSupAccNum = new javax.swing.JTextField();

        setMaximumSize(new java.awt.Dimension(700, 500));
        setMinimumSize(new java.awt.Dimension(700, 500));
        setPreferredSize(new java.awt.Dimension(700, 500));
        setLayout(new java.awt.BorderLayout());

        pnlHeadListSup.setBackground(new java.awt.Color(204, 255, 204));
        pnlHeadListSup.setPreferredSize(new java.awt.Dimension(700, 78));

        lblHeadListSup.setFont(new java.awt.Font("Tahoma", 1, 16));
        lblHeadListSup.setText("จัดการข้อมูลผู้จำหน่าย");

        btnSupListSearch.setIcon(new javax.swing.ImageIcon(getClass().getResource("/icon/search_30x30.gif"))); // NOI18N

        btnSupListAdd.setIcon(new javax.swing.ImageIcon(getClass().getResource("/icon/add_30x30.gif"))); // NOI18N

        btnSupListDel.setIcon(new javax.swing.ImageIcon(getClass().getResource("/icon/del_30x30.gif"))); // NOI18N

        btnSupListEdit.setFont(new java.awt.Font("Tahoma", 0, 14));
        btnSupListEdit.setIcon(new javax.swing.ImageIcon(getClass().getResource("/icon/edit1_30x30.gif"))); // NOI18N
        btnSupListEdit.setMaximumSize(new java.awt.Dimension(75, 30));
        btnSupListEdit.setMinimumSize(new java.awt.Dimension(75, 30));
        btnSupListEdit.setPreferredSize(new java.awt.Dimension(75, 30));

        btnSupPrint.setIcon(new javax.swing.ImageIcon(getClass().getResource("/icon/print_30x30.gif"))); // NOI18N
        btnSupPrint.setMaximumSize(new java.awt.Dimension(40, 40));
        btnSupPrint.setMinimumSize(new java.awt.Dimension(40, 40));
        btnSupPrint.setPreferredSize(new java.awt.Dimension(40, 40));

        javax.swing.GroupLayout pnlHeadListSupLayout = new javax.swing.GroupLayout(pnlHeadListSup);
        pnlHeadListSup.setLayout(pnlHeadListSupLayout);
        pnlHeadListSupLayout.setHorizontalGroup(
            pnlHeadListSupLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlHeadListSupLayout.createSequentialGroup()
                .addGap(20, 20, 20)
                .addGroup(pnlHeadListSupLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(lblHeadListSup)
                    .addGroup(pnlHeadListSupLayout.createSequentialGroup()
                        .addComponent(btnSupListSearch, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(btnSupListAdd, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(btnSupListDel, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(btnSupListEdit, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(btnSupPrint, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addContainerGap(440, Short.MAX_VALUE))
        );
        pnlHeadListSupLayout.setVerticalGroup(
            pnlHeadListSupLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlHeadListSupLayout.createSequentialGroup()
                .addGap(10, 10, 10)
                .addComponent(lblHeadListSup)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(pnlHeadListSupLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addComponent(btnSupPrint, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(btnSupListSearch, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 40, Short.MAX_VALUE)
                    .addComponent(btnSupListAdd, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 40, Short.MAX_VALUE)
                    .addComponent(btnSupListDel, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 40, Short.MAX_VALUE)
                    .addComponent(btnSupListEdit, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 40, Short.MAX_VALUE))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        add(pnlHeadListSup, java.awt.BorderLayout.PAGE_START);

        pnlListSup.setPreferredSize(new java.awt.Dimension(700, 330));

        tblListSupplier.setFont(new java.awt.Font("Tahoma", 0, 12));
        tblListSupplier.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {
                {null, null, null, null, null},
                {null, null, null, null, null},
                {null, null, null, null, null},
                {null, null, null, null, null}
            },
            new String [] {
                "บริษัทผู้จัดจำหน่าย", "ที่อยู่", "ตัวแทนจำหน่าย", "เบอร์โทรศัพท์", "Fax"
            }
        ) {
            Class[] types = new Class [] {
                java.lang.String.class, java.lang.String.class, java.lang.String.class, java.lang.String.class, java.lang.String.class
            };
            boolean[] canEdit = new boolean [] {
                false, false, false, false, false
            };

            public Class getColumnClass(int columnIndex) {
                return types [columnIndex];
            }

            public boolean isCellEditable(int rowIndex, int columnIndex) {
                return canEdit [columnIndex];
            }
        });
        tblListSupplier.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));
        jScrollPane1.setViewportView(tblListSupplier);

        lblSupCode.setFont(new java.awt.Font("Tahoma", 0, 12));
        lblSupCode.setText("รหัสผู้จำหน่าย :");

        lblSupCompany.setFont(new java.awt.Font("Tahoma", 0, 12));
        lblSupCompany.setText("บริษัทผู้จำหน่าย :");

        lblSupAddress.setFont(new java.awt.Font("Tahoma", 0, 12));
        lblSupAddress.setText("ที่อยู่ :");

        lblSupContact.setFont(new java.awt.Font("Tahoma", 0, 12));
        lblSupContact.setText("ตัวแทน :");

        lblSupPhone.setFont(new java.awt.Font("Tahoma", 0, 12));
        lblSupPhone.setText("เบอร์โทรศัพท์ :");

        lblSupFax.setFont(new java.awt.Font("Tahoma", 0, 12));
        lblSupFax.setText("Fax :");

        txtSupCode.setFont(new java.awt.Font("Tahoma", 0, 12));

        txtSupPhone.setFont(new java.awt.Font("Tahoma", 0, 12));

        txtSupCompany.setFont(new java.awt.Font("Tahoma", 0, 12));

        txtSupFax.setFont(new java.awt.Font("Tahoma", 0, 12));

        txtSupContact.setFont(new java.awt.Font("Tahoma", 0, 12));

        txaSupAddress.setColumns(13);
        txaSupAddress.setFont(new java.awt.Font("Tahoma", 0, 12));
        txaSupAddress.setRows(2);
        jScrollPane2.setViewportView(txaSupAddress);

        lblSupPrivace.setFont(new java.awt.Font("Tahoma", 0, 12));
        lblSupPrivace.setText("จังหวัด :");

        cmbSupProvice.setFont(new java.awt.Font("Tahoma", 0, 12));
        cmbSupProvice.setModel(new javax.swing.DefaultComboBoxModel(new String[] { " " }));

        lblSupZip.setFont(new java.awt.Font("Tahoma", 0, 12));
        lblSupZip.setText("รหัสไปรษณีย์ :");

        txtSupZip.setFont(new java.awt.Font("Tahoma", 0, 12));

        lblSupStatus.setFont(new java.awt.Font("Tahoma", 0, 12));
        lblSupStatus.setText("สถานะการชำระเงิน :");

        cmbSupStatus.setFont(new java.awt.Font("Tahoma", 0, 12));

        lblSupAccNum.setFont(new java.awt.Font("Tahoma", 0, 12));
        lblSupAccNum.setText("หมายเลขบัญชี :");

        txtSupAccNum.setFont(new java.awt.Font("Tahoma", 0, 12));
        txtSupAccNum.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                txtSupAccNumActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout pnlListSupLayout = new javax.swing.GroupLayout(pnlListSup);
        pnlListSup.setLayout(pnlListSupLayout);
        pnlListSupLayout.setHorizontalGroup(
            pnlListSupLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlListSupLayout.createSequentialGroup()
                .addGap(20, 20, 20)
                .addGroup(pnlListSupLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(lblSupStatus)
                    .addComponent(lblSupCode)
                    .addComponent(lblSupPhone)
                    .addComponent(lblSupPrivace))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(pnlListSupLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addComponent(cmbSupStatus, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(cmbSupProvice, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(txtSupPhone)
                    .addComponent(txtSupCode, javax.swing.GroupLayout.DEFAULT_SIZE, 122, Short.MAX_VALUE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(pnlListSupLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(lblSupAccNum, javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(lblSupZip, javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(lblSupFax, javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(lblSupCompany, javax.swing.GroupLayout.Alignment.TRAILING))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(pnlListSupLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(txtSupAccNum)
                    .addComponent(txtSupZip)
                    .addComponent(txtSupFax)
                    .addComponent(txtSupCompany, javax.swing.GroupLayout.DEFAULT_SIZE, 125, Short.MAX_VALUE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(pnlListSupLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(lblSupAddress, javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(lblSupContact, javax.swing.GroupLayout.Alignment.TRAILING))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(pnlListSupLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addComponent(txtSupContact)
                    .addComponent(jScrollPane2, javax.swing.GroupLayout.DEFAULT_SIZE, 150, Short.MAX_VALUE))
                .addGap(23, 23, 23))
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, pnlListSupLayout.createSequentialGroup()
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 680, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap())
        );
        pnlListSupLayout.setVerticalGroup(
            pnlListSupLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlListSupLayout.createSequentialGroup()
                .addGap(20, 20, 20)
                .addGroup(pnlListSupLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addGroup(pnlListSupLayout.createSequentialGroup()
                        .addGroup(pnlListSupLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(txtSupCode, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(lblSupCode))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(pnlListSupLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(txtSupPhone, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(lblSupPhone))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(pnlListSupLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(lblSupPrivace)
                            .addComponent(cmbSupProvice, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                    .addGroup(pnlListSupLayout.createSequentialGroup()
                        .addGroup(pnlListSupLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(txtSupCompany, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(lblSupCompany))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(pnlListSupLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(txtSupFax, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(lblSupFax))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(pnlListSupLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(lblSupZip)
                            .addComponent(txtSupZip, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                    .addGroup(pnlListSupLayout.createSequentialGroup()
                        .addGroup(pnlListSupLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(txtSupContact, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(lblSupContact))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(pnlListSupLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 48, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(lblSupAddress))))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(pnlListSupLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(pnlListSupLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                        .addGroup(pnlListSupLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(lblSupStatus)
                            .addComponent(cmbSupStatus, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addGroup(pnlListSupLayout.createSequentialGroup()
                            .addComponent(lblSupAccNum)
                            .addGap(6, 6, 6)))
                    .addComponent(txtSupAccNum, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 262, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(27, 27, 27))
        );

        add(pnlListSup, java.awt.BorderLayout.CENTER);
    }// </editor-fold>//GEN-END:initComponents

    private void txtSupAccNumActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_txtSupAccNumActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_txtSupAccNumActionPerformed


    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton btnSupListAdd;
    private javax.swing.JButton btnSupListDel;
    private javax.swing.JButton btnSupListEdit;
    private javax.swing.JButton btnSupListSearch;
    private javax.swing.JButton btnSupPrint;
    private javax.swing.JComboBox cmbSupProvice;
    private javax.swing.JComboBox cmbSupStatus;
    private javax.swing.JScrollPane jScrollPane1;
    private javax.swing.JScrollPane jScrollPane2;
    private javax.swing.JLabel lblHeadListSup;
    private javax.swing.JLabel lblSupAccNum;
    private javax.swing.JLabel lblSupAddress;
    private javax.swing.JLabel lblSupCode;
    private javax.swing.JLabel lblSupCompany;
    private javax.swing.JLabel lblSupContact;
    private javax.swing.JLabel lblSupFax;
    private javax.swing.JLabel lblSupPhone;
    private javax.swing.JLabel lblSupPrivace;
    private javax.swing.JLabel lblSupStatus;
    private javax.swing.JLabel lblSupZip;
    private javax.swing.JPanel pnlHeadListSup;
    private javax.swing.JPanel pnlListSup;
    private javax.swing.JTable tblListSupplier;
    private javax.swing.JTextArea txaSupAddress;
    private javax.swing.JTextField txtSupAccNum;
    private javax.swing.JTextField txtSupCode;
    private javax.swing.JTextField txtSupCompany;
    private javax.swing.JTextField txtSupContact;
    private javax.swing.JTextField txtSupFax;
    private javax.swing.JTextField txtSupPhone;
    private javax.swing.JTextField txtSupZip;
    // End of variables declaration//GEN-END:variables

}
